package com.ruoyi.activityAddress.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.activityAddress.mapper.ActivityAddressMapper;
import com.ruoyi.activityAddress.domain.ActivityAddress;
import com.ruoyi.activityAddress.service.IActivityAddressService;

/**
 * 活动地址Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-13
 */
@Service
public class ActivityAddressServiceImpl implements IActivityAddressService 
{
    @Autowired
    private ActivityAddressMapper activityAddressMapper;

    /**
     * 查询活动地址
     * 
     * @param id 活动地址主键
     * @return 活动地址
     */
    @Override
    public ActivityAddress selectActivityAddressById(Long id)
    {
        return activityAddressMapper.selectActivityAddressById(id);
    }

    /**
     * 查询活动地址列表
     * 
     * @param activityAddress 活动地址
     * @return 活动地址
     */
    @Override
    public List<ActivityAddress> selectActivityAddressList(ActivityAddress activityAddress)
    {
        return activityAddressMapper.selectActivityAddressList(activityAddress);
    }

    /**
     * 新增活动地址
     * 
     * @param activityAddress 活动地址
     * @return 结果
     */
    @Override
    public int insertActivityAddress(ActivityAddress activityAddress)
    {
        activityAddress.setCreateTime(DateUtils.getNowDate());
        return activityAddressMapper.insertActivityAddress(activityAddress);
    }

    /**
     * 修改活动地址
     * 
     * @param activityAddress 活动地址
     * @return 结果
     */
    @Override
    public int updateActivityAddress(ActivityAddress activityAddress)
    {
        activityAddress.setUpdateTime(DateUtils.getNowDate());
        return activityAddressMapper.updateActivityAddress(activityAddress);
    }

    /**
     * 批量删除活动地址
     * 
     * @param ids 需要删除的活动地址主键
     * @return 结果
     */
    @Override
    public int deleteActivityAddressByIds(Long[] ids)
    {
        return activityAddressMapper.deleteActivityAddressByIds(ids);
    }

    /**
     * 删除活动地址信息
     * 
     * @param id 活动地址主键
     * @return 结果
     */
    @Override
    public int deleteActivityAddressById(Long id)
    {
        return activityAddressMapper.deleteActivityAddressById(id);
    }
}
